package com.esun.payment_api.mapper;

import com.esun.payment_api.bean.*;
import com.esun.payment_api.domain.DkClaim;
import com.esun.payment_api.domain.DkClaimExample;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;

public interface DkClaimMapper {
    long countByExample(DkClaimExample example);

    int deleteByExample(DkClaimExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(DkClaim record);

    int insertSelective(DkClaim record);

    List<DkClaim> selectByExample(DkClaimExample example);

    DkClaim selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") DkClaim record, @Param("example") DkClaimExample example);

    int updateByExample(@Param("record") DkClaim record, @Param("example") DkClaimExample example);

    int updateByPrimaryKeySelective(DkClaim record);

    int updateByPrimaryKey(DkClaim record);
    //原接口
    List<DkClaimBean> getDkClaimData(Short userId, Short deptId, Short coId, String searchStr, String flowStatus, Integer claimId, String monthStr, String deptName, String startTime, String endTime, String receiveType, String businessType);
    //重写认领列表接口
    List<DkClaimBean> getDkClaimDataList(Short userId, Short deptId, Short coId, String searchStr, String flowStatus, Integer claimId, String monthStr, String deptName, String startTime, String endTime, String receiveType, String businessType);

    SumDkReceiveMoneyBean getDkClaimDataSum(Short userId, Short deptId, Short coId, String searchStr, String flowStatus, Integer claimId, String monthStr, String deptName, String startTime, String endTime, String receiveType, String businessType);

    void claimRelateInvoice(@Param("invoiceStr")String invoiceStr,@Param("claimId") Integer claimId,@Param("companyId") Short companyId,@Param("userId") Short userId);

    void claimRelateContract(@Param("contractStr")String contractStr,@Param("claimId") Integer claimId,@Param("companyId") Short companyId,@Param("userId") Short userId);

    void claimRelateTask(@Param("taskStr")String taskStr,@Param("claimId") Integer claimId,@Param("companyId") Short companyId,@Param("userId") Short userId);

    void claimCancelInvoice(@Param("invoiceStr")String invoiceStr,@Param("claimId") Integer claimId,@Param("companyId") Short companyId,@Param("userId") Short userId);

    void claimCancelContract(@Param("contractStr")String contractStr,@Param("claimId") Integer claimId,@Param("companyId") Short companyId,@Param("userId") Short userId);

    void submitClaim(Short companyId, String uuid, Integer claimId, Short userId, Short departmentId);

    void submitClaimNoInvoice(Short companyId, String uuid, Integer claimId, Short userId, Short departmentId);

    void submitClaimNoContract(Short companyId, String uuid, Integer claimId, Short userId, Short departmentId);

    void submitClaimSimplified(Short companyId, String uuid, Integer claimId, Short userId, Short departmentId);

    void submitClaimSimplifiedNoInvoice(Short companyId, String uuid, Integer claimId, Short userId, Short departmentId);
    //申请人部门是研究发展处
    void submitClaimDeptIsYfc(Short companyId, String uuid, Integer claimId, Short userId, Short departmentId);
    //业务类型为纵向
    void submitClaimYwlxIsZx(Short companyId, String uuid, Integer claimId, Short userId, Short departmentId);
    //业务类型为其他
    void submitClaimYwlxIsQt(Short companyId, String uuid, Integer claimId, Short userId, Short departmentId);
    //业务类型为非主业收款 改为版面费
    void submitClaimYwlxIsBmf(Short companyId, String uuid, Integer claimId, Short userId, Short departmentId);
    //业务类型为考试费
    void submitClaimYwlxIsKsf(Short companyId, String uuid, Integer claimId, Short userId, Short departmentId);
    //业务类型为纵向YH
    void submitClaimYwlxIsZxYH(Short companyId, String uuid, Integer claimId, Short userId, Short departmentId);
    //业务类型为纵向WQ
    void submitClaimYwlxIsZxWQ(Short companyId, String uuid, Integer claimId, Short userId, Short departmentId);

    BigDecimal getTotalClaimedMoney(Integer receiveId, Short companyId, Integer claimId);

    void resubmitClaim(Short companyId, String uuid, Integer claimId, Short userId, Short departmentId);

    void resubmitClaimNoInvoice(Short companyId, String uuid, Integer claimId, Short userId, Short departmentId);

    void resubmitClaimNoContract(Short companyId, String uuid, Integer claimId, Short userId, Short departmentId);

    void resubmitClaimSimplified(Short companyId, String uuid, Integer claimId, Short userId, Short departmentId);

    void resubmitClaimSimplifiedNoInvoice(Short companyId, String uuid, Integer claimId, Short userId, Short departmentId);
    //申请人部门是研究发展处
    void resubmitClaimDeptIsYfc(Short companyId, String uuid, Integer claimId, Short userId, Short departmentId);
    //业务类型为纵向
    void resubmitClaimYwlxIsZx(Short companyId, String uuid, Integer claimId, Short userId, Short departmentId);
    //业务类型为其他
    void resubmitClaimYwlxIsQt(Short companyId, String uuid, Integer claimId, Short userId, Short departmentId);
    //业务类型为非主业收款 改为版面费
    void resubmitClaimYwlxIsBmf(Short companyId, String uuid, Integer claimId, Short userId, Short departmentId);
    //业务类型为考试费
    void resubmitClaimYwlxIsKsf(Short companyId, String uuid, Integer claimId, Short userId, Short departmentId);
    //业务类型为纵向YH
    void resubmitClaimYwlxIsZxYH(Short companyId, String uuid, Integer claimId, Short userId, Short departmentId);
    //业务类型为纵向WQ
    void resubmitClaimYwlxIsZxWQ(Short companyId, String uuid, Integer claimId, Short userId, Short departmentId);

    int insertSelectiveReturnId(DkClaim record);

    void cancelClaim(Integer claimId, Short companyId, Short userId);

    List<DkFlowBean> getFlowByClaimId(Integer claimId, Short companyId);

    List<DkFlowBean> getApplicationFlowByClaimId(Integer claimId);

    void rejectClaim(Integer flowId, Integer claimId, String flowNotes, Short userId);

    void approveClaim(Integer flowId, Integer claimId, String flowNotes, Short userId);

    String checkClaim(Integer claimId);

    void autoCalMoney(Integer claimId);
    //发票-选择到款-已认领列表
    List<DkClaimedBean> getDkClaimedList(BigDecimal invMoney, Short coId, String searchStr);
    //生成银行回单
    void addBankReceipt(Integer claimId);

    //商承-逾期名单列表
    List<DwmdBean> getScYqmdList(Short coId, String searchStr);

    //银承-白名单列表
    List<DwmdBean> getYcBmdList(Short coId, String searchStr);
}